package com.zto.design.observer.jdk;

import org.junit.Test;

/**
 * @program: sch-diy-parent
 * @description:
 * @author: sch
 * @create: 2020-11-27 17:02
 **/
public class TestJdkObserve {
    @Test
    public void testJdkObserve(){
        ConcreteObservable concreteObservable = new ConcreteObservable();

        ObserveA obA1 = new ObserveA();
        ObserveA obA2 = new ObserveA();
        ObserveA obA3 = new ObserveA();


        concreteObservable.addObserver(obA1);
        concreteObservable.addObserver(obA2);
        concreteObservable.addObserver(obA3);

        concreteObservable.notifyObservers();
    }
}
